package cn.shop.cloud.redis;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @program: shop-parent
 * @ClassName RedisProperties
 * @description:
 * @author: Mokio
 * @create: 2024−12-23 17:14
 * @Version 2024 2.2 ; jdk1.8.0_181
 **/
// 绑定配置类
@ConfigurationProperties(prefix = "redis")
public class RedisProperties {

    // redis服务器地址
    private String host;
    // redis服务器端口号
    private int port;
    // redis服务器密码
    private String password;

    // 连接超时时间
    private int timeout;

    // 连接池相关参数
    private int poolMaxIdle
            , poolMaxTotal
            , poolMaxWait;// 这里我们设置的单位是秒，后续实际导入时需要×1000转换为毫秒。


    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public int getPoolMaxIdle() {
        return poolMaxIdle;
    }

    public void setPoolMaxIdle(int poolMaxIdle) {
        this.poolMaxIdle = poolMaxIdle;
    }

    public int getPoolMaxTotal() {
        return poolMaxTotal;
    }

    public void setPoolMaxTotal(int poolMaxTotal) {
        this.poolMaxTotal = poolMaxTotal;
    }

    public int getPoolMaxWait() {
        return poolMaxWait;
    }

    public void setPoolMaxWait(int poolMaxWait) {
        this.poolMaxWait = poolMaxWait;
    }
}
